var accountNames = [
"Sustainalytics Demo",
"Sustainalytics Admin Global Access Platform",
"Sustainalytics Deliverables",
"Sustainalytics IR Demo Account",
"Sustainalytics Romania_For Deliverables Only",
"Sustainalytics Webinar",
"TEST PI"]

var accountIds = db.Account.find({Name: { $in: accountNames}}).map(function(item) { return item._id })
db.User.update({"IsLegalAgreementAccepted": true, AccountId: { $nin: accountIds }}, { $set: { "IsLegalAgreementAccepted": false }}, { multi: true })